//
//  CollectView.m
//  BasketballClub
//
//  Created by 孙鸿吉 on 16/1/18.
//  Copyright © 2016年 孙鸿吉. All rights reserved.
//

#import "CollectView.h"

@implementation CollectView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self allViews];
    }
    return self;
}
- (void)allViews
{
    self.title = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/2 - (40 * LAYOUT_SIZE), 29 * LAYOUT_SIZE_HEIGHT, 80* LAYOUT_SIZE, 26 * LAYOUT_SIZE_HEIGHT)];
    self.title.text = @"我的收藏";
    self.title.textAlignment = 1;
    self.title.textColor = [UIColor yellowColor];
    self.title.font = [UIFont systemFontOfSize:17 * LAYOUT_SIZE];
    [self addSubview:self.title];
    
    //取消按钮
    self.cancleButton = [[UIButton alloc]initWithFrame:CGRectMake(10 * LAYOUT_SIZE, 29 * LAYOUT_SIZE_HEIGHT, 50 * LAYOUT_SIZE, 26 * LAYOUT_SIZE_HEIGHT)];
    [self.cancleButton setImage:[UIImage imageNamed:@"fanhui"] forState:UIControlStateNormal];
    [self addSubview:self.cancleButton];
    
    self.collectTableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 64 * LAYOUT_SIZE_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT - 64 * LAYOUT_SIZE_HEIGHT) style:UITableViewStylePlain];
    self.collectTableView.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.collectTableView];
    
    self.editButton = [[UIButton alloc]initWithFrame:CGRectMake(SCREEN_WIDTH - (60 * LAYOUT_SIZE), 29 * LAYOUT_SIZE, 50 * LAYOUT_SIZE, 26 * LAYOUT_SIZE)];
    [self.editButton setTitle:@"编辑" forState:UIControlStateNormal];
    self.editButton.titleLabel.font = [UIFont systemFontOfSize:17 * LAYOUT_SIZE];
    [self.editButton setTitleColor:[UIColor yellowColor] forState:UIControlStateNormal];
    [self addSubview:self.editButton];
}
@end
